﻿using System;

namespace YiHaoHospitalPlatform.Model
{
    public class Laboratory:BaseModel
    {
        /// <summary>
        /// 项目标识，打包号或者条码号
        /// </summary>
        public string XMBZ { get; set;}
        /// <summary>
        /// 开单科室
        /// </summary>
        public string KDKS { get; set; }
        /// <summary>
        /// 检验科室
        /// </summary>
        public string JYKS { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public string SL { get; set; }
        /// <summary>
        /// 项目名称
        /// </summary>
        public string XMMC { get; set; }
        /// <summary>
        /// 采集时间
        /// </summary>
        public DateTime CJSJ { get; set; }
        /// <summary>
        /// 急诊标志 0非急诊 1急诊
        /// </summary>
        public int JZBZ { get; set; }
        

        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return false;
            }
            if ((obj.GetType().Equals(this.GetType())) == false)
            {
                return false;
            }
            Laboratory temp = null;
            temp = (Laboratory)obj;

            return this.XMBZ.Equals(temp.XMBZ) && this.KDKS.Equals(temp.KDKS) && this.JYKS.Equals(temp.JYKS)
                && this.SL.Equals(temp.SL) && this.XMMC.Equals(temp.XMMC) && this.CJSJ.Equals(temp.CJSJ) && this.JZBZ.Equals(temp.JZBZ);
        }

        //重写GetHashCode方法（重写Equals方法必须重写GetHashCode方法，否则发生警告

        public override int GetHashCode()
        {
            return this.XMBZ.GetHashCode() + this.KDKS.GetHashCode() + this.JYKS.GetHashCode() + this.SL.GetHashCode() + this.XMMC.GetHashCode() + this.CJSJ.GetHashCode() + this.JZBZ.GetHashCode();
        }
    }
}
